package org.yumeko.spring;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;

@ContextConfiguration("classpath:redis.xml")
public class RedisTest extends AbstractJUnit4SpringContextTests {
    @Autowired
    private RedisTemplate<String, String> rt;
    @Test
    public void testConn() {
        rt.opsForValue().set("name","zhangfei");
        System.out.println(rt.opsForValue().get("name"));
    }
}
